#ifndef TYPE_H_
#define TYPE_H_

#define TYPEDEF_ARR_1D(TYPE, DIM1) \
  typedef TYPE TYPE_##DIM1[DIM1];

#define TYPEDEF_ARR_2D(TYPE, DIM1, DIM2) \
  typedef TYPE TYPE_##DIM1##_##DIM2[DIM1][DIM2];

#define TYPEDEF_ARR_3D(TYPE, DIM1, DIM2, DIM3) \
  typedef TYPE TYPE_##DIM1##_##DIM2##_##DIM3[DIM1][DIM2][DIM3];

#define TYPEDEF_CONST(TYPE) \
  typedef const TYPE const_##TYPE;

#define TYPEDEF_CONST_P(TYPE) \
  typedef  const TYPE* const_##TYPE##_p;

#define TYPEDEF_CONST_PP(TYPE) \
  typedef const TYPE** const_##TYPE##_pp;

#define TYPEDEF_P(TYPE) \
  typedef TYPE* TYPE##_p;

#define TYPEDEF_PP(TYPE) \
  typedef TYPE** TYPE##_pp;

#endif